package com.wolf.lottery.common.constants;

/**
 * @description:
 * @author: wolf
 * @date: 2023/6/14
 */
public enum ResponseCode {
    /**
     * 成功
     */
    SUCCESS("0000", "成功"),
    /**
     * 未知失败
     */
    UN_ERROR("0001", "未知失败"),
    /**
     * 非法参数
     */
    ILLEGAL_PARAMETER("0002", "非法参数"),
    /**
     * 主键冲突
     */
    INDEX_DUP("0003", "主键冲突"),
    /**
     * SQL操作无更新
     */
    NO_UPDATE("0004", "SQL操作无更新"),
    /**
     * 未中奖
     */
    LOSING_DRAW("D001", "未中奖"),
    /**
     * 量化人群规则执行失败
     */
    RULE_ERR("D002", "量化人群规则执行失败"),
    /**
     * 未消费活动领取记录
     */
    NOT_CONSUMED_TAKE("D003", "未消费活动领取记录"),
    /**
     * 活动无库存
     */
    OUT_OF_STOCK("D004", "活动无库存"),
    /**
     * 分布式锁失败
     */
    ERR_TOKEN("D005", "分布式锁失败");

    private String code;
    private String info;

    ResponseCode(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
}
